package com.tiancheng.trade.payment.service;

import com.tiancheng.trade.commom.core.exception.BusinessException;
import com.tiancheng.trade.payment.bo.notify.PayNotifyBO;
import com.tiancheng.trade.payment.channel.bo.PayResultBO;
import com.tiancheng.trade.payment.channel.bo.RefundResultBO;
import com.tiancheng.trade.commom.core.enums.PaymentChannelEnum;
import com.tiancheng.trade.payment.channel.umsdhjt.request.UmsDhjtSettleNotifyRequest;
import com.tiancheng.trade.payment.model.PaymentOrder;

import java.util.Map;

/**
 * 回调处理
 * @author su
 *
 */
public interface NotifyService {
    /**
     * 支付回调处理
     * @param paramsMap 回调参数
     * @param paymentChannelEnum 支付渠道
     * @throws BusinessException
     */
    void payNotifyHandle(Map<String, Object> paramsMap, PaymentChannelEnum paymentChannelEnum)throws BusinessException;

    /**
     * 退款回调处理
     * @param paramsMap 回调参数
     * @param paymentChannelEnum 支付渠道
     * @throws BusinessException
     */
    void refundNotifyHandle(Map<String, Object> paramsMap, PaymentChannelEnum paymentChannelEnum)throws BusinessException;

    Map<String, String> qrC2BNotifyHandle(Map<String, String> params);

    /**
     * 推送支付消息
     * @param paymentOrder 支付流水
     * @param status 支付状态
     * @param couponAmount 优惠金额
     * @return
     */
    boolean  sendPayFlowMessage(PayNotifyBO paymentOrder, String status, Integer couponAmount);

    /**
     * 模拟支付通知
     * @param payResultBO
     */
    void mockPayNotify(PayResultBO payResultBO);
    /**
     * 模拟退款通知
     * @param refundResultBO
     */
    void mockRefundNotify(RefundResultBO refundResultBO);

    /**
     * 大华接通结算通知消息
     * @param params
     */
    void dhjtSettleResult(UmsDhjtSettleNotifyRequest params);
}
